s = input("输入字符:")
zimu = 0
space = 0
num = 0
others = 0
for i in s:
   if i.isalpha():#检测字符是否包含字母是返回True，否返回False
      zimu += 1
   elif i.isspace():#检测字符是否包含空格是返回True,否返回False
      space += 1
   elif i.isdigit():#检测字符是否包含数字是否返回True,否返回Fasle
      num += 1
   else:
      others += 1
print('英文字母有{}个,空格有{}个，数字有{}个,其它字符有{}个'.format(zimu,space,num,others))
